import random,time

aa = random.randint(10,100)
aa_list = []
for i in range(1,10000):
    aa = random.randint(10, 100)
    aa_list.append(aa)

print(aa_list)

# 快速排序
def quickSort(alist):
    if not alist:
        return alist

    pivot = random.choice(alist)
    # print(pivot)
    equalList = []
    smallerList = []
    biggerList = []

    for item in alist:
        if item < pivot:
            smallerList.append(item)
        elif item == pivot:
            equalList.append(item)
        else:
            biggerList.append(item)
    return quickSort(biggerList)+equalList+quickSort(smallerList)


start = time.perf_counter()
print(aa_list)
su = quickSort(aa_list)
print(su)
print("耗时>>>",start)